package work_c;

import java.util.HashMap;
import java.util.Map;
import java.util.Set;

public class HashMap_test01 {
    public static void main(String[] args) {
        HashMap<Integer, String> hashMap = new HashMap<>();
        hashMap.put(1,"张三");
        hashMap.put(2,"李四");
        hashMap.put(3,"王五");
        System.out.println(hashMap);
        System.out.println("=============");
        Set<Integer>keys=hashMap.keySet();
        for (Integer key : keys) {
            String s = hashMap.get(key);
            System.out.println(key+ "== " + s);
        }
//        Set<Map.Entry<Integer,String>>entries=hashMap.entrySet();
//      for ( hashMap.Entry<Integer,String>entry:entries){
//          entry.
//      }

    }
}
